<div class="eavFields form">
<?php echo $form->create($fieldModelAlias, array('url'=>'/'.$this->params['url']['url']));?>
	<?php
		echo $form->inputs(null,null,'edit');
	?>
		<!-- <a href="javascript:void();" onclick="return insertRange();">Insert numeric range</a>	 -->
<?php echo $form->end(__('Submit'));?>
</div>
<?php echo $javascript->link('/eav/js/eav.js',false)?>

<script type="text/javascript">
	var typeOptions =  <?php echo $javascript->object(ClassRegistry::getObject($fieldModelAlias)->getOptionsFieldType())?>;
	Eav.modelAlias = "<?php echo $fieldModelAlias?>";
	$(document).ready(function()
	{
		Eav.typeWithOptions = $.makeArray(typeOptions);
		
		$('#'+Eav.getFieldId('Type')).change(function(){
				Eav.doForFieldType();
			})
			Eav.doForFieldType();
	});
</script>
